package com.zzy.study.conf;

import java.net.URL;

/**
 * 学习ClassLoader
 * @author eason
 *
 */
public class TestClassLoader {
	public static void main(String[] args) {
		ClassLoader classLoader1 = TestClassLoader.class.getClassLoader();
		ClassLoader classLoader2 = Thread.currentThread().getContextClassLoader();
		System.out.println(classLoader1 == classLoader2);
		
		System.out.println(classLoader1.getParent());
		
		URL url1 = classLoader1.getResource("core.xml");
		URL url2 = classLoader2.getResource("core.xml");
		System.out.println(url1);
		System.out.println(url2);
	}

}
